#include "StdAfx.h"
#include "YUVFileCapture.hxx"
#include "ChannelYUVCapture.hxx"
#include "Frame.hxx"

#define WIDTH RAW_FRAME_WIDTH		
#define HEIGHT RAW_FRAME_HEIGHT	

YUVFileCapture::YUVFileCapture(void)
{
	_channels = 0;
}

YUVFileCapture::~YUVFileCapture(void)
{
	
		if( _channels )
		{
			delete _channels;
		}
}

void YUVFileCapture::initialize()
{
	
		_channels = new ChannelYUVCapture();
		_channels->setDataCapture( this );
}

void YUVFileCapture::setChannelWnd( int channel, HWND wnd )
{
	if( _channels )
		_channels->SetDispWnd( wnd );
}

void YUVFileCapture::start()
{
	DataCapture::start();

	char szCurrentDateTime[256];     
	SYSTEMTIME systm;     
	GetLocalTime(&systm);     
	sprintf( szCurrentDateTime, "%4d%.2d%.2d%.2d%.2d%.2d",     
		systm.wYear, systm.wMonth, systm.wDay,     
		systm.wHour, systm.wMinute, systm.wSecond ); 
		
		//////////////////////////////////////////////////////////////////////////
		_channels ->CreateReadYUVThread();
}

void YUVFileCapture::stop()
{
}

void YUVFileCapture::captureFrame()
{
}
